<div class="grid_3 alpha"><input id="create" value="Crear Plan" type="button" onclick="window.location = '/planes/edit/0';"/></div>
<div class="grid_6 omega" style="text-align:right;">
    <?php echo $paginator->prev()." ["; ?>
    <?php echo $paginator->numbers(); ?>
    <?php echo "] ".$paginator->next(); ?>
    <?php echo "&nbsp;&nbsp;[".$paginator->counter()."]"; ?>
</div>
<div class="clear"></div>

<?php echo $this->Form->create('Planes', array(
										'url'           => array('controller' => 'planes', 'action' => 'delete'),
										'inputDefaults' => array('label' => false, 'div' => false)
										)
								); ?>
    <br />
    <table width="100%">
        <thead>
            <tr>
                <th width="30">Select</th>
                <th width="20"><?php echo $this->Paginator->sort('id');?></th>
                <th><?php echo $this->Paginator->sort('name');?></th>
                <th>Cant.Pacientes</th>
				<th><?php echo $this->Paginator->sort('precio');?></th>
				<th>Moneda</th>
            </tr>
        </thead>
        <tbody>
        
    	<?php $i = 0;
    	foreach ($planes as $plan):
    		$class = null;
    		if ($i++ % 2 == 0) { $class = ' class="altrow"'; }
    	?>
            <tr>
                <td><input name="data[Delete][<?php echo $plan['Plan']['id'];?>]" value="1" id="Delete<?php echo $plan['Plan']['id'];?>" type="checkbox"/></td>
                <td><?php echo $plan['Plan']['id']; ?>&nbsp;</td>
                <td>
                    <?php echo $this->Html->link($plan['Plan']['name'],
                                array('controller' => 'planes', 'action' => 'edit/'.$plan['Plan']['id'])); ?> 
                </td>     
                <td><?php echo $plan['Plan']['maximo_pacientes'];?></td>                           
				<td style="text-align:right;"><?php echo number_format($plan['Plan']['precio'],2);?></td>
				<td><?php echo $plan['Money']['name'];?></td>
				
            </tr>
        <?php endforeach; ?>
        </tbody>
    </table>
    
	<br />    
	<div class="clear"></div>

	<div class="grid_3 alpha">
		<input name="delete" id="delete" value="Eliminar Seleccionados" type="submit" onclick="return confirm('Est&aacute; seguro de eliminar esos registros?');"/>
	</div>
	<div class="grid_6 omega" style="text-align:right;">
		<?php echo $paginator->prev()." ["; ?>
		<?php echo $paginator->numbers(); ?>
		<?php echo "] ".$paginator->next(); ?>
		<?php echo "&nbsp;&nbsp;[".$paginator->counter()."]"; ?>
	</div>
	<div class="clear"></div>
	<br />
	<div class="grid_3 alpha"><input id="create" value="Crear Plan" type="button" onclick="window.location = '/planes/edit/0';"/></div>
	<div class="clear"></div>
</form>